package com.itheima.goodsconsumer.service;

import com.itheima.goodsconsumer.model.Cart;
import com.itheima.goodsconsumer.model.Goods;
import com.itheima.goodsconsumer.model.Userorder;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Classname GoodsService
 * @Description TODO
 * @Date 2019-9-17 19:16
 * @Created by CrazyStone
 */

public interface GoodsService {
    public List<Goods> getAllgoods();
    public List<Goods> getOnegoods(@RequestParam(value = "gname") String gname);
    //public int paygoods(@RequestParam(value = "gid") int gid, @RequestParam(value = "gremain") int gremain);
    public List<Userorder> getAllorder(@RequestParam(value = "uid") int uid);
    public Goods getOnegid(@RequestParam(value = "gid") int gid);
    public int insertOrder(@RequestParam(value = "goodsname") String goodsname, @RequestParam(value = "number") Integer number,
                           @RequestParam(value = "price") Integer price, @RequestParam(value = "uid") Integer uid);
    public List<Cart> getAllcart(@RequestParam(value = "uid") int uid);
    public int intcart(@RequestParam(value = "goodsname") String goodsname, @RequestParam(value = "number") Integer number,
                       @RequestParam(value = "price") Integer price, @RequestParam(value = "goodid") Integer goodid, @RequestParam(value = "uid") Integer uid);
    public int deleteCart(@RequestParam(value = "gid") int gid);
    public int updateCart(@RequestParam(value = "number") int number, @RequestParam(value = "id") int id);
}
